<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <style>
    .wrapper {
      width: 200px;
      height: 200px;
      background: greenyellow;
    }
  </style>
</head>

<body>
  <div id="app">

    <!-- <div :class="{wrapper:isWrapper,main:false}"></div>
    <div :class="mainClass"></div> -->
    <!-- <div :class="classObj"></div> -->
    <!-- <div :class="getClassObj"></div> -->
    <!-- <div :class="[classA,classB]"></div> -->
    <!-- <custom-dialog class="dialog"></custom-dialog> -->

    <!-- <div :style="{fontSize:size}">太原2002</div>
    <div style="font-size:20px">太原2002</div> -->
    <div :style="[styleA,styleB]">太原2002</div>

  </div>

  <script>

    Vue.component('custom-dialog',{
      template:`<div class="title dialog">自定义对话框</div>`
    })

    var vm = new Vue({
      data: {
        isWrapper: true,
        mainClass: 'wrapper',
        classObj: {
          main: true,
          wrapper: true
        },
        size:'30px',
        classA:"a",
        classB:'b',
        styleA:{
          fontSize:'30px'
        },
        styleB:{
          color:'red'
        }
      },
      computed: {
        getClassObj() {
          return {
            main: this.isWrapper
          }
        }
      },
      el: "#app"
    })
  </script>
</body>

</html>